package com.example.weatherapp1.domain.usecase

import com.example.weatherapp1.data.model.City
import com.example.weatherapp1.data.model.WeatherResponse
import com.example.weatherapp1.domain.service.WeatherService
import javax.inject.Inject


class GetWeatherForCityUseCase @Inject constructor(
    private val weatherService: WeatherService
) {
    suspend operator fun invoke(city: City): WeatherResponse {
        return weatherService.fetchAndSaveWeather(city)
    }
}
